package cn.aop;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class Advice {
    //定义一个切点表达式
    @Pointcut("execution(* cn.aop.*.teach(..))")
    public  void pointcut(){ }

    @After("pointcut()")
    public void after(){
        System.out.println("最终通知");
    }
}
